package com.yb.rxjava;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;

import com.yb.rxjava.create.CreateActivity;
import com.yb.rxjava.databinding.ActivityMainBinding;
import com.yb.rxjava.interval.IntervalActivity;
import com.yb.rxjava.map.MapActivity;
import com.yb.rxjava.timer.TimerActivity;


public class MainActivity extends AppCompatActivity {

    private static final String TAG = MainActivity.class.getSimpleName();

    private ActivityMainBinding mainBinding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mainBinding = ActivityMainBinding.inflate(LayoutInflater.from(this));
        setContentView(mainBinding.getRoot());
        mainBinding.mBtCreate.setOnClickListener(v ->
                startActivity(new Intent(this, CreateActivity.class)));
        mainBinding.mBtMap.setOnClickListener(v ->
                startActivity(new Intent(this, MapActivity.class)));
        mainBinding.mBtInterval.setOnClickListener(v ->
                startActivity(new Intent(this, IntervalActivity.class)));
        mainBinding.mBtTimer.setOnClickListener(v ->
                startActivity(new Intent(this, TimerActivity.class)));
    }
}